package server;
import util.Logger;
import dataContracts.Command;

class DeleteFileHandler implements Runnable {
	ClientConnection client;
	ServerProgram server;
	String commandText;
	
	DeleteFileHandler(ClientConnection client, ServerProgram server, String commandText) {
		this.server = server;
		this.client = client;
		this.commandText = commandText;
	}
	
	@Override
	public void run() {
		server.directory.deleteFile(commandText);
//		client.command(Command.Type.DeleteFile, commandText);
		server.commandAllClients(new Command(Command.Type.DeleteFile, commandText));
	}
}